home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / shells / scsh-0.4 / scsh-0 / scsh-0.4.2 / configure < prev    next >
Text File  |  1995-11-04  |  53KB  |  2,097 lines

  1. #! /bin/sh
  2.  
  3. # Guess values for system-dependent variables and create Makefiles.
  4. # Generated automatically using autoconf version 2.4 
  5. # Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
  6. #
  7. # This configure script is free software; the Free Software Foundation
  8. # gives unlimited permission to copy, distribute and modify it.
  9.  
  10. # Defaults:
  11. ac_help=
  12. ac_default_prefix=/usr/local
  13. # Any additions from configure.in:
  14.  
  15. # Initialize some variables set by options.
  16. # The variables have the same names as the options, with
  17. # dashes changed to underlines.
  18. build=NONE
  19. cache_file=./config.cache
  20. exec_prefix=NONE
  21. host=NONE
  22. no_create=
  23. nonopt=NONE
  24. no_recursion=
  25. prefix=NONE
  26. program_prefix=NONE
  27. program_suffix=NONE
  28. program_transform_name=s,x,x,
  29. silent=
  30. site=
  31. srcdir=
  32. target=NONE
  33. verbose=
  34. x_includes=NONE
  35. x_libraries=NONE
  36.  
  37. # Initialize some other variables.
  38. subdirs=
  39.  
  40. ac_prev=
  41. for ac_option
  42. do
  43.  
  44.   # If the previous option needs an argument, assign it.
  45.   if test -n "$ac_prev"; then
  46.     eval "$ac_prev=\$ac_option"
  47.     ac_prev=
  48.     continue
  49.   fi
  50.  
  51.   case "$ac_option" in
  52.   -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  53.   *) ac_optarg= ;;
  54.   esac
  55.  
  56.   # Accept the important Cygnus configure options, so we can diagnose typos.
  57.  
  58.   case "$ac_option" in
  59.  
  60.   -build | --build | --buil | --bui | --bu | --b)
  61.     ac_prev=build ;;
  62.   -build=* | --build=* | --buil=* | --bui=* | --bu=* | --b=*)
  63.     build="$ac_optarg" ;;
  64.  
  65.   -cache-file | --cache-file | --cache-fil | --cache-fi \
  66.   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
  67.     ac_prev=cache_file ;;
  68.   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
  69.   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
  70.     cache_file="$ac_optarg" ;;
  71.  
  72.   -disable-* | --disable-*)
  73.     ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
  74.     # Reject names that are not valid shell variable names.
  75.     if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
  76.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  77.     fi
  78.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  79.     eval "enable_${ac_feature}=no" ;;
  80.  
  81.   -enable-* | --enable-*)
  82.     ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
  83.     # Reject names that are not valid shell variable names.
  84.     if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
  85.       { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
  86.     fi
  87.     ac_feature=`echo $ac_feature| sed 's/-/_/g'`
  88.     case "$ac_option" in
  89.       *=*) ;;
  90.       *) ac_optarg=yes ;;
  91.     esac
  92.     eval "enable_${ac_feature}='$ac_optarg'" ;;
  93.  
  94.   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
  95.   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
  96.   | --exec | --exe | --ex)
  97.     ac_prev=exec_prefix ;;
  98.   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
  99.   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
  100.   | --exec=* | --exe=* | --ex=*)
  101.     exec_prefix="$ac_optarg" ;;
  102.  
  103.   -gas | --gas | --ga | --g)
  104.     # Obsolete; use --with-gas.
  105.     with_gas=yes ;;
  106.  
  107.   -help | --help | --hel | --he)
  108.     # Omit some internal or obsolete options to make the list less imposing.
  109.     # This message is too long to be a string in the A/UX 3.1 sh.
  110.     cat << EOF
  111. Usage: configure [options] [host]
  112. Options: [defaults in brackets after descriptions]
  113. Configuration:
  114.   --cache-file=FILE       cache test results in FILE
  115.   --help                  print this message
  116.   --no-create             do not create output files
  117.   --quiet, --silent       do not print \`checking...' messages
  118.   --version               print the version of autoconf that created configure
  119. Directory and file names:
  120.   --prefix=PREFIX         install architecture-independent files in PREFIX
  121.                           [$ac_default_prefix]
  122.   --exec-prefix=PREFIX    install architecture-dependent files in PREFIX
  123.                           [same as prefix]
  124.   --srcdir=DIR            find the sources in DIR [configure dir or ..]
  125.   --program-prefix=PREFIX prepend PREFIX to installed program names
  126.   --program-suffix=SUFFIX append SUFFIX to installed program names
  127.   --program-transform-name=PROGRAM run sed PROGRAM on installed program names
  128. Host type:
  129.   --build=BUILD           configure for building on BUILD [BUILD=HOST]
  130.   --host=HOST             configure for HOST [guessed]
  131.   --target=TARGET         configure for TARGET [TARGET=HOST]
  132. Features and packages:
  133.   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
  134.   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
  135.   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
  136.   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
  137.   --x-includes=DIR        X include files are in DIR
  138.   --x-libraries=DIR       X library files are in DIR
  139. --enable and --with options recognized:$ac_help
  140. EOF
  141.     exit 0 ;;
  142.  
  143.   -host | --host | --hos | --ho)
  144.     ac_prev=host ;;
  145.   -host=* | --host=* | --hos=* | --ho=*)
  146.     host="$ac_optarg" ;;
  147.  
  148.   -nfp | --nfp | --nf)
  149.     # Obsolete; use --without-fp.
  150.     with_fp=no ;;
  151.  
  152.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  153.   | --no-cr | --no-c)
  154.     no_create=yes ;;
  155.  
  156.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  157.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
  158.     no_recursion=yes ;;
  159.  
  160.   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
  161.     ac_prev=prefix ;;
  162.   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
  163.     prefix="$ac_optarg" ;;
  164.  
  165.   -program-prefix | --program-prefix | --program-prefi | --program-pref \
  166.   | --program-pre | --program-pr | --program-p)
  167.     ac_prev=program_prefix ;;
  168.   -program-prefix=* | --program-prefix=* | --program-prefi=* \
  169.   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
  170.     program_prefix="$ac_optarg" ;;
  171.  
  172.   -program-suffix | --program-suffix | --program-suffi | --program-suff \
  173.   | --program-suf | --program-su | --program-s)
  174.     ac_prev=program_suffix ;;
  175.   -program-suffix=* | --program-suffix=* | --program-suffi=* \
  176.   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
  177.     program_suffix="$ac_optarg" ;;
  178.  
  179.   -program-transform-name | --program-transform-name \
  180.   | --program-transform-nam | --program-transform-na \
  181.   | --program-transform-n | --program-transform- \
  182.   | --program-transform | --program-transfor \
  183.   | --program-transfo | --program-transf \
  184.   | --program-trans | --program-tran \
  185.   | --progr-tra | --program-tr | --program-t)
  186.     ac_prev=program_transform_name ;;
  187.   -program-transform-name=* | --program-transform-name=* \
  188.   | --program-transform-nam=* | --program-transform-na=* \
  189.   | --program-transform-n=* | --program-transform-=* \
  190.   | --program-transform=* | --program-transfor=* \
  191.   | --program-transfo=* | --program-transf=* \
  192.   | --program-trans=* | --program-tran=* \
  193.   | --progr-tra=* | --program-tr=* | --program-t=*)
  194.     program_transform_name="$ac_optarg" ;;
  195.  
  196.   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
  197.   | -silent | --silent | --silen | --sile | --sil)
  198.     silent=yes ;;
  199.  
  200.   -site | --site | --sit)
  201.     ac_prev=site ;;
  202.   -site=* | --site=* | --sit=*)
  203.     site="$ac_optarg" ;;
  204.  
  205.   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
  206.     ac_prev=srcdir ;;
  207.   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
  208.     srcdir="$ac_optarg" ;;
  209.  
  210.   -target | --target | --targe | --targ | --tar | --ta | --t)
  211.     ac_prev=target ;;
  212.   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
  213.     target="$ac_optarg" ;;
  214.  
  215.   -v | -verbose | --verbose | --verbos | --verbo | --verb)
  216.     verbose=yes ;;
  217.  
  218.   -version | --version | --versio | --versi | --vers)
  219.     echo "configure generated by autoconf version 2.4"
  220.     exit 0 ;;
  221.  
  222.   -with-* | --with-*)
  223.     ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
  224.     # Reject names that are not valid shell variable names.
  225.     if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
  226.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  227.     fi
  228.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  229.     case "$ac_option" in
  230.       *=*) ;;
  231.       *) ac_optarg=yes ;;
  232.     esac
  233.     eval "with_${ac_package}='$ac_optarg'" ;;
  234.  
  235.   -without-* | --without-*)
  236.     ac_package=`echo $ac_option|sed -e 's/-*without-//'`
  237.     # Reject names that are not valid shell variable names.
  238.     if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
  239.       { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
  240.     fi
  241.     ac_package=`echo $ac_package| sed 's/-/_/g'`
  242.     eval "with_${ac_package}=no" ;;
  243.  
  244.   --x)
  245.     # Obsolete; use --with-x.
  246.     with_x=yes ;;
  247.  
  248.   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
  249.   | --x-incl | --x-inc | --x-in | --x-i)
  250.     ac_prev=x_includes ;;
  251.   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
  252.   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
  253.     x_includes="$ac_optarg" ;;
  254.  
  255.   -x-libraries | --x-libraries | --x-librarie | --x-librari \
  256.   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
  257.     ac_prev=x_libraries ;;
  258.   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
  259.   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
  260.     x_libraries="$ac_optarg" ;;
  261.  
  262.   -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
  263.     ;;
  264.  
  265.   *) 
  266.     if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
  267.       echo "configure: warning: $ac_option: invalid host type" 1>&2
  268.     fi
  269.     if test "x$nonopt" != xNONE; then
  270.       { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
  271.     fi
  272.     nonopt="$ac_option"
  273.     ;;
  274.  
  275.   esac
  276. done
  277.  
  278. if test -n "$ac_prev"; then
  279.   { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
  280. fi
  281.  
  282. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  283.  
  284. # File descriptor usage:
  285. # 0 standard input
  286. # 1 file creation
  287. # 2 errors and warnings
  288. # 3 some systems may open it to /dev/tty
  289. # 4 used on the Kubota Titan
  290. # 6 checking for... messages and results
  291. # 5 compiler messages saved in config.log
  292. if test "$silent" = yes; then
  293.   exec 6>/dev/null
  294. else
  295.   exec 6>&1
  296. fi
  297. exec 5>./config.log
  298.  
  299. echo "\
  300. This file contains any messages produced by compilers while
  301. running configure, to aid debugging if configure makes a mistake.
  302. " 1>&5
  303.  
  304. # Strip out --no-create and --no-recursion so they do not pile up.
  305. # Also quote any args containing shell metacharacters.
  306. ac_configure_args=
  307. for ac_arg
  308. do
  309.   case "$ac_arg" in
  310.   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
  311.   | --no-cr | --no-c) ;;
  312.   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
  313.   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
  314.   *" "*|*"    "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
  315.   ac_configure_args="$ac_configure_args '$ac_arg'" ;;
  316.   *) ac_configure_args="$ac_configure_args $ac_arg" ;;
  317.   esac
  318. done
  319.  
  320. # NLS nuisances.
  321. # Only set LANG and LC_ALL to C if already set.
  322. # These must not be set unconditionally because not all systems understand
  323. # e.g. LANG=C (notably SCO).
  324. if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
  325. if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
  326.  
  327. # confdefs.h avoids OS command line length limits that DEFS can exceed.
  328. rm -rf conftest* confdefs.h
  329. # AIX cpp loses on an empty file, so make sure it contains at least a newline.
  330. echo > confdefs.h
  331.  
  332. # A filename unique to this package, relative to the directory that
  333. # configure is in, which we can look for to find out if srcdir is correct.
  334. ac_unique_file=scheme48vm.c
  335.  
  336. # Find the source files, if location was not specified.
  337. if test -z "$srcdir"; then
  338.   ac_srcdir_defaulted=yes
  339.   # Try the directory containing this script, then its parent.
  340.   ac_prog=$0
  341.   ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
  342.   test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
  343.   srcdir=$ac_confdir
  344.   if test ! -r $srcdir/$ac_unique_file; then
  345.     srcdir=..
  346.   fi
  347. else
  348.   ac_srcdir_defaulted=no
  349. fi
  350. if test ! -r $srcdir/$ac_unique_file; then
  351.   if test "$ac_srcdir_defaulted" = yes; then
  352.     { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
  353.   else
  354.     { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
  355.   fi
  356. fi
  357. srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
  358.  
  359. # Prefer explicitly selected file to automatically selected ones.
  360. if test -z "$CONFIG_SITE"; then
  361.   if test "x$prefix" != xNONE; then
  362.     CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
  363.   else
  364.     CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
  365.   fi
  366. fi
  367. for ac_site_file in $CONFIG_SITE; do
  368.   if test -r "$ac_site_file"; then
  369.     echo "loading site script $ac_site_file"
  370.     . "$ac_site_file"
  371.   fi
  372. done
  373.  
  374. if test -r "$cache_file"; then
  375.   echo "loading cache $cache_file"
  376.   . $cache_file
  377. else
  378.   echo "creating cache $cache_file"
  379.   > $cache_file
  380. fi
  381.  
  382. ac_ext=c
  383. # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
  384. ac_cpp='$CPP $CPPFLAGS'
  385. ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5 2>&5'
  386. ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5 2>&5'
  387.  
  388. if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
  389.   # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
  390.   if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
  391.     ac_n= ac_c='
  392. ' ac_t='    '
  393.   else
  394.     ac_n=-n ac_c= ac_t=
  395.   fi
  396. else
  397.   ac_n= ac_c='\c' ac_t=
  398. fi
  399.  
  400.  
  401.  
  402.  
  403. ac_aux_dir=
  404. for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
  405.   if test -f $ac_dir/install-sh; then
  406.     ac_aux_dir=$ac_dir
  407.     ac_install_sh="$ac_aux_dir/install-sh -c"
  408.     break
  409.   elif test -f $ac_dir/install.sh; then
  410.     ac_aux_dir=$ac_dir
  411.     ac_install_sh="$ac_aux_dir/install.sh -c"
  412.     break
  413.   fi
  414. done
  415. if test -z "$ac_aux_dir"; then
  416.   { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
  417. fi
  418. ac_config_guess=$ac_aux_dir/config.guess
  419. ac_config_sub=$ac_aux_dir/config.sub
  420. ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
  421.  
  422.  
  423. # Make sure we can run config.sub.
  424. if $ac_config_sub sun4 >/dev/null 2>&1; then :
  425. else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
  426. fi
  427.  
  428. echo $ac_n "checking host system type""... $ac_c" 1>&6
  429.  
  430. host_alias=$host
  431. case "$host_alias" in
  432. NONE)
  433.   case $nonopt in
  434.   NONE)
  435.     if host_alias=`$ac_config_guess`; then :
  436.     else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
  437.     fi ;;
  438.   *) host_alias=$nonopt ;;
  439.   esac ;;
  440. esac
  441.  
  442. host=`$ac_config_sub $host_alias`
  443. host_cpu=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
  444. host_vendor=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
  445. host_os=`echo $host | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
  446. echo "$ac_t""$host" 1>&6
  447.  
  448.  
  449. # Extract the first word of "gcc", so it can be a program name with args.
  450. set dummy gcc; ac_word=$2
  451. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  452. if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
  453.   echo $ac_n "(cached) $ac_c" 1>&6
  454. else
  455.   if test -n "$CC"; then
  456.   ac_cv_prog_CC="$CC" # Let the user override the test.
  457. else
  458.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  459.   for ac_dir in $PATH; do
  460.     test -z "$ac_dir" && ac_dir=.
  461.     if test -f $ac_dir/$ac_word; then
  462.       ac_cv_prog_CC="gcc"
  463.       break
  464.     fi
  465.   done
  466.   IFS="$ac_save_ifs"
  467.   test -z "$ac_cv_prog_CC" && ac_cv_prog_CC="cc"
  468. fi
  469. fi
  470. CC="$ac_cv_prog_CC"
  471. if test -n "$CC"; then
  472.   echo "$ac_t""$CC" 1>&6
  473. else
  474.   echo "$ac_t""no" 1>&6
  475. fi
  476.  
  477.  
  478. echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
  479. if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
  480.   echo $ac_n "(cached) $ac_c" 1>&6
  481. else
  482.   cat > conftest.c <<EOF
  483. #ifdef __GNUC__
  484.   yes;
  485. #endif
  486. EOF
  487. if ${CC-cc} -E conftest.c 2>&5 | egrep yes >/dev/null 2>&1; then
  488.   ac_cv_prog_gcc=yes
  489. else
  490.   ac_cv_prog_gcc=no
  491. fi
  492. fi
  493. echo "$ac_t""$ac_cv_prog_gcc" 1>&6
  494. if test $ac_cv_prog_gcc = yes; then
  495.   GCC=yes
  496.   if test "${CFLAGS+set}" != set; then
  497.     echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
  498. if eval "test \"`echo '$''{'ac_cv_prog_gcc_g'+set}'`\" = set"; then
  499.   echo $ac_n "(cached) $ac_c" 1>&6
  500. else
  501.   echo 'void f(){}' > conftest.c
  502. if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
  503.   ac_cv_prog_gcc_g=yes
  504. else
  505.   ac_cv_prog_gcc_g=no
  506. fi
  507. rm -f conftest*
  508.  
  509. fi
  510.     echo "$ac_t""$ac_cv_prog_gcc_g" 1>&6
  511.     if test $ac_cv_prog_gcc_g = yes; then
  512.       CFLAGS="-g -O"
  513.     else
  514.       CFLAGS="-O"
  515.     fi
  516.   fi
  517. else
  518.   GCC=
  519.   test "${CFLAGS+set}" = set || CFLAGS="-g"
  520. fi
  521.  
  522. echo $ac_n "checking for POSIXized ISC""... $ac_c" 1>&6
  523. if test -d /etc/conf/kconfig.d &&
  524.   grep _POSIX_VERSION /usr/include/sys/unistd.h >/dev/null 2>&1
  525. then
  526.   echo "$ac_t""yes" 1>&6
  527.   ISC=yes # If later tests want to check for ISC.
  528.   cat >> confdefs.h <<\EOF
  529. #define _POSIX_SOURCE 1
  530. EOF
  531.  
  532.   if test "$GCC" = yes; then
  533.     CC="$CC -posix"
  534.   else
  535.     CC="$CC -Xp"
  536.   fi
  537. else
  538.   echo "$ac_t""no" 1>&6
  539.   ISC=
  540. fi
  541.  
  542.  
  543.   case "$host" in
  544.     *-*-linux* )
  545.     echo $ac_n "checking for broken Linux that needs -static with -g""... $ac_c" 1>&6
  546.     if eval "test \"`echo '$''{'scsh_cv_linux_static_debug'+set}'`\" = set"; then
  547.   echo $ac_n "(cached) $ac_c" 1>&6
  548. else
  549.   
  550.       cat > conftest.$ac_ext <<EOF
  551. #line 552 "configure"
  552. #include "confdefs.h"
  553.  
  554. int main() { return 0; }
  555. int t() {
  556.  
  557. ; return 0; }
  558. EOF
  559. if eval $ac_link; then
  560.   rm -rf conftest*
  561.   scsh_cv_linux_static_debug=no
  562. else
  563.   rm -rf conftest*
  564.   scsh_cv_linux_static_debug=yes
  565. fi
  566. rm -f conftest*
  567.  
  568. fi
  569.  
  570.     echo "$ac_t""$scsh_cv_linux_static_debug" 1>&6
  571.     if test $scsh_cv_linux_static_debug = yes; then
  572.       LDFLAGS="-static ${LDFLAGS}"
  573.     fi
  574.   ;;
  575.   esac
  576.  
  577. # Find a good install program.  We prefer a C program (faster),
  578. # so one script is as good as another.  But avoid the broken or
  579. # incompatible versions:
  580. # SysV /etc/install, /usr/sbin/install
  581. # SunOS /usr/etc/install
  582. # IRIX /sbin/install
  583. # AIX /bin/install
  584. # AFS /usr/afsws/bin/install, which mishandles nonexistent args
  585. # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
  586. # ./install, which can be erroneously created by make from ./install.sh.
  587. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
  588. if test -z "$INSTALL"; then
  589. if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
  590.   echo $ac_n "(cached) $ac_c" 1>&6
  591. else
  592.     IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  593.   for ac_dir in $PATH; do
  594.     # Account for people who put trailing slashes in PATH elements.
  595.     case "$ac_dir/" in
  596.     /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
  597.     *)
  598.       # OSF1 and SCO ODT 3.0 have their own names for install.
  599.       for ac_prog in ginstall installbsd scoinst install; do
  600.         if test -f $ac_dir/$ac_prog; then
  601.       if test $ac_prog = install &&
  602.             grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
  603.         # AIX install.  It has an incompatible calling convention.
  604.         # OSF/1 installbsd also uses dspmsg, but is usable.
  605.         :
  606.       else
  607.         ac_cv_path_install="$ac_dir/$ac_prog -c"
  608.         break 2
  609.       fi
  610.     fi
  611.       done
  612.       ;;
  613.     esac
  614.   done
  615.   IFS="$ac_save_ifs"
  616.   # As a last resort, use the slow shell script.
  617.   test -z "$ac_cv_path_install" && ac_cv_path_install="$ac_install_sh"
  618. fi
  619.   INSTALL="$ac_cv_path_install"
  620. fi
  621. echo "$ac_t""$INSTALL" 1>&6
  622.  
  623. # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
  624. # It thinks the first close brace ends the variable substitution.
  625. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
  626.  
  627. test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
  628.  
  629. # Extract the first word of "ranlib", so it can be a program name with args.
  630. set dummy ranlib; ac_word=$2
  631. echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
  632. if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
  633.   echo $ac_n "(cached) $ac_c" 1>&6
  634. else
  635.   if test -n "$RANLIB"; then
  636.   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
  637. else
  638.   IFS="${IFS=     }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
  639.   for ac_dir in $PATH; do
  640.     test -z "$ac_dir" && ac_dir=.
  641.     if test -f $ac_dir/$ac_word; then
  642.       ac_cv_prog_RANLIB="ranlib"
  643.       break
  644.     fi
  645.   done
  646.   IFS="$ac_save_ifs"
  647.   test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
  648. fi
  649. fi
  650. RANLIB="$ac_cv_prog_RANLIB"
  651. if test -n "$RANLIB"; then
  652.   echo "$ac_t""$RANLIB" 1>&6
  653. else
  654.   echo "$ac_t""no" 1>&6
  655. fi
  656.  
  657. echo $ac_n "checking for working const""... $ac_c" 1>&6
  658. if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
  659.   echo $ac_n "(cached) $ac_c" 1>&6
  660. else
  661.   cat > conftest.$ac_ext <<EOF
  662. #line 663 "configure"
  663. #include "confdefs.h"
  664.  
  665. int main() { return 0; }
  666. int t() {
  667.  
  668. /* Ultrix mips cc rejects this.  */
  669. typedef int charset[2]; const charset x;
  670. /* SunOS 4.1.1 cc rejects this.  */
  671. char const *const *ccp;
  672. char **p;
  673. /* NEC SVR4.0.2 mips cc rejects this.  */
  674. struct point {int x, y;};
  675. static struct point const zero;
  676. /* AIX XL C 1.02.0.0 rejects this.
  677.    It does not let you subtract one const X* pointer from another in an arm
  678.    of an if-expression whose if-part is not a constant expression */
  679. const char *g = "string";
  680. ccp = &g + (g ? g-g : 0);
  681. /* HPUX 7.0 cc rejects these. */
  682. ++ccp;
  683. p = (char**) ccp;
  684. ccp = (char const *const *) p;
  685. { /* SCO 3.2v4 cc rejects this.  */
  686.   char *t;
  687.   char const *s = 0 ? (char *) 0 : (char const *) 0;
  688.  
  689.   *t++ = 0;
  690. }
  691. { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
  692.   int x[] = {25, 17};
  693.   const int *foo = &x[0];
  694.   ++foo;
  695. }
  696. { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
  697.   typedef const int *iptr;
  698.   iptr p = 0;
  699.   ++p;
  700. }
  701. { /* AIX XL C 1.02.0.0 rejects this saying
  702.      "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
  703.   struct s { int j; const int *ap[3]; };
  704.   struct s *b; b->j = 5;
  705. }
  706. { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
  707.   const int foo = 10;
  708. }
  709.  
  710. ; return 0; }
  711. EOF
  712. if eval $ac_compile; then
  713.   rm -rf conftest*
  714.   ac_cv_c_const=yes
  715. else
  716.   rm -rf conftest*
  717.   ac_cv_c_const=no
  718. fi
  719. rm -f conftest*
  720.  
  721. fi
  722. echo "$ac_t""$ac_cv_c_const" 1>&6
  723. if test $ac_cv_c_const = no; then
  724.   cat >> confdefs.h <<\EOF
  725. #define const 
  726. EOF
  727.  
  728. fi
  729.  
  730.  
  731. # If we cannot run a trivial program, we must be cross compiling.
  732. echo $ac_n "checking whether cross-compiling""... $ac_c" 1>&6
  733. if eval "test \"`echo '$''{'ac_cv_c_cross'+set}'`\" = set"; then
  734.   echo $ac_n "(cached) $ac_c" 1>&6
  735. else
  736.   if test "$cross_compiling" = yes; then
  737.   ac_cv_c_cross=yes
  738. else
  739. cat > conftest.$ac_ext <<EOF
  740. #line 741 "configure"
  741. #include "confdefs.h"
  742. main(){return(0);}
  743. EOF
  744. eval $ac_link
  745. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  746.   ac_cv_c_cross=no
  747. else
  748.   ac_cv_c_cross=yes
  749. fi
  750. fi
  751. rm -fr conftest*
  752. fi
  753. cross_compiling=$ac_cv_c_cross
  754. echo "$ac_t""$ac_cv_c_cross" 1>&6
  755.  
  756. echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
  757. if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
  758.   echo $ac_n "(cached) $ac_c" 1>&6
  759. else
  760.   ac_cv_c_bigendian=unknown
  761. # See if sys/param.h defines the BYTE_ORDER macro.
  762. cat > conftest.$ac_ext <<EOF
  763. #line 764 "configure"
  764. #include "confdefs.h"
  765. #include <sys/types.h>
  766. #include <sys/param.h>
  767. int main() { return 0; }
  768. int t() {
  769.  
  770. #if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
  771.  bogus endian macros
  772. #endif
  773. ; return 0; }
  774. EOF
  775. if eval $ac_compile; then
  776.   rm -rf conftest*
  777.   # It does; now see whether it defined to BIG_ENDIAN or not.
  778. cat > conftest.$ac_ext <<EOF
  779. #line 780 "configure"
  780. #include "confdefs.h"
  781. #include <sys/types.h>
  782. #include <sys/param.h>
  783. int main() { return 0; }
  784. int t() {
  785.  
  786. #if BYTE_ORDER != BIG_ENDIAN
  787.  not big endian
  788. #endif
  789. ; return 0; }
  790. EOF
  791. if eval $ac_compile; then
  792.   rm -rf conftest*
  793.   ac_cv_c_bigendian=yes
  794. else
  795.   rm -rf conftest*
  796.   ac_cv_c_bigendian=no
  797. fi
  798. rm -f conftest*
  799.  
  800. fi
  801. rm -f conftest*
  802.  
  803. if test $ac_cv_c_bigendian = unknown; then
  804. if test "$cross_compiling" = yes; then
  805.     { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
  806. else
  807. cat > conftest.$ac_ext <<EOF
  808. #line 809 "configure"
  809. #include "confdefs.h"
  810. main () {
  811.   /* Are we little or big endian?  From Harbison&Steele.  */
  812.   union
  813.   {
  814.     long l;
  815.     char c[sizeof (long)];
  816.   } u;
  817.   u.l = 1;
  818.   exit (u.c[sizeof (long) - 1] == 1);
  819. }
  820. EOF
  821. eval $ac_link
  822. if test -s conftest && (./conftest; exit) 2>/dev/null; then
  823.   ac_cv_c_bigendian=no
  824. else
  825.   ac_cv_c_bigendian=yes
  826. fi
  827. fi
  828. rm -fr conftest*
  829. fi
  830. fi
  831. echo "$ac_t""$ac_cv_c_bigendian" 1>&6
  832. if test $ac_cv_c_bigendian = yes; then
  833.   cat >> confdefs.h <<\EOF
  834. #define WORDS_BIGENDIAN 1
  835. EOF
  836.  
  837. fi
  838.  
  839. if test $ac_cv_c_bigendian = no ; then
  840.   ENDIAN=little
  841. else
  842.   ENDIAN=big
  843. fi
  844.  
  845. AR=${AR-"ar cq"}
  846. TMPDIR=${TMPDIR-"/usr/tmp"}
  847.  
  848. case "$host" in
  849.  
  850.   ## CX/UX
  851.   m88k-harris-cxux* )
  852.     dir=cxux
  853.     CC="cc -Xa"
  854.     CFLAGS="-O"
  855.     LDFLAGS="-O -Wl,-Bexport"
  856.     cat >> confdefs.h <<\EOF
  857. #define HAVE_HARRIS 1
  858. EOF
  859.  
  860.   ;;
  861.     
  862.   ## DEC Ultrix
  863.   mips-dec-ultrix* )
  864.     dir=ultrix
  865.     if test ${CC} = cc; then
  866.       LDFLAGS=-N
  867.     fi
  868.   ;;
  869.   
  870.   ## HP 9000 series 700 and 800, running HP/UX
  871.   hppa*-hp-hpux* )
  872.     dir=hpux
  873.     if test ${CC} = cc; then
  874.       CFLAGS="-Ae -O +Obb1800"
  875.       cat >> confdefs.h <<\EOF
  876. #define _HPUX_SOURCE 1
  877. EOF
  878.  
  879.       cat >> confdefs.h <<\EOF
  880. #define hpux 1
  881. EOF
  882.  
  883.     fi
  884.   ;;
  885.   
  886.   ## IBM AIX
  887.   rs6000-ibm-aix*|powerpc-ibm-aix* )
  888.     dir=aix
  889.     LDFLAGS="-O"
  890.     if test ${CC} = gcc; then
  891.       LDFLAGS_AIX="-Xlinker -bexport:exportlist.aix"
  892.     else
  893.       LDFLAGS_AIX="-bexport:exportlist.aix"
  894.     fi
  895.     CFLAGS="-O"
  896.     AIX_P="exportlist.aix"
  897.   ;;
  898.   
  899.   ## Linux
  900.   *-*-linux* )
  901.     dir=linux
  902.     # gross, but needed for some older a.out systems for 0.4.x
  903.     LIBS=-lc
  904.     
  905.   echo $ac_n "checking for Linux using ELF""... $ac_c" 1>&6
  906.   if eval "test \"`echo '$''{'scsh_cv_linux_elf'+set}'`\" = set"; then
  907.   echo $ac_n "(cached) $ac_c" 1>&6
  908. else
  909.   
  910.     touch conftest.c
  911.     if ${CC} -v conftest.c 2>&1 | grep -q __ELF__ ; then
  912.       scsh_cv_linux_elf=yes
  913.     else
  914.       scsh_cv_linux_elf=no
  915.     fi
  916. fi
  917.  
  918.   echo "$ac_t""$scsh_cv_linux_elf" 1>&6
  919.   if test $scsh_cv_linux_elf = yes; then
  920.     LDFLAGS=-rdynamic
  921.   fi
  922.   rm -f conftest.c a.out
  923.  
  924.   ;;
  925.   
  926.   ## NetBSD and FreeBSD ( and maybe 386BSD also)
  927.   *-*-*bsd* )
  928.     dir=bsd
  929.   ;;
  930.   
  931.   ## NeXT
  932.   *-next-* )
  933.     dir=next
  934.     CC="$CC -posix"
  935.     cat >> confdefs.h <<\EOF
  936. #define HAVE_SIGACTION 1
  937. EOF
  938.  
  939.   ;;
  940.   
  941.   ## SGI IRIX
  942.   mips-sgi-irix* )
  943.     dir=irix
  944.     
  945.   echo $ac_n "checking ${CC} for -cckr""... $ac_c" 1>&6
  946.   if eval "test \"`echo '$''{'s48_cv_cflag_ckr'+set}'`\" = set"; then
  947.   echo $ac_n "(cached) $ac_c" 1>&6
  948. else
  949.   
  950.     if test ${CC} != gcc; then
  951.       echo "main(){int i=1;}" > conftest.c
  952.       if CFLAGS="-cckr ${CFLAGS}" eval $ac_compile
  953.       then
  954.         s48_cv_cflag_ckr=yes
  955.       else
  956.         s48_cv_cflag_ckr=no
  957.       fi
  958.     else
  959.       s48_cv_cflag_ckr=no
  960.     fi
  961.     rm -f conftest*
  962. fi
  963.  
  964.   echo "$ac_t""$s48_cv_cflag_ckr" 1>&6
  965.   if test $s48_cv_cflag_ckr = yes; then
  966.     CFLAGS=$CFLAGS
  967.   fi
  968.  
  969.     INSTALL='$(srcdir)/install-sh'
  970.   ;;
  971.   
  972.   ## SunOS
  973.   sparc*-sun-sunos* )
  974.    dir=sunos
  975.   ;;
  976.   
  977.   ## Solaris
  978.   sparc*-sun-solaris* )
  979.     dir=solaris
  980.     cat >> confdefs.h <<\EOF
  981. #define HAVE_NLIST 1
  982. EOF
  983.  
  984.   ;;
  985.   
  986.   ## Generic Configuration
  987.   * )
  988.     dir=generic
  989.     echo "WARNING: "
  990.     echo "WARNING: Using generic configuration."
  991.     echo "WARNING: See doc/install.txt for more information."
  992.     echo "WARNING: "
  993.   ;;
  994. esac
  995.  
  996. /bin/rm -f $srcdir/scsh/machine
  997. ln -s $srcdir/$dir $srcdir/scsh/machine
  998.  
  999. echo $ac_n "checking for -lm""... $ac_c" 1>&6
  1000. if eval "test \"`echo '$''{'ac_cv_lib_m'+set}'`\" = set"; then
  1001.   echo $ac_n "(cached) $ac_c" 1>&6
  1002. else
  1003.   ac_save_LIBS="$LIBS"
  1004. LIBS="-lm  $LIBS"
  1005. cat > conftest.$ac_ext <<EOF
  1006. #line 1007 "configure"
  1007. #include "confdefs.h"
  1008.  
  1009. int main() { return 0; }
  1010. int t() {
  1011. sqrt(0.0) + t()
  1012. ; return 0; }
  1013. EOF
  1014. if eval $ac_link; then
  1015.   rm -rf conftest*
  1016.   eval "ac_cv_lib_m=yes"
  1017. else
  1018.   rm -rf conftest*
  1019.   eval "ac_cv_lib_m=no"
  1020. fi
  1021. rm -f conftest*
  1022. LIBS="$ac_save_LIBS"
  1023.  
  1024. fi
  1025. if eval "test \"`echo '$ac_cv_lib_'m`\" = yes"; then
  1026.   echo "$ac_t""yes" 1>&6
  1027.     ac_tr_lib=HAVE_LIB`echo m | tr '[a-z]' '[A-Z]'`
  1028.   cat >> confdefs.h <<EOF
  1029. #define $ac_tr_lib 1
  1030. EOF
  1031.  
  1032.   LIBS="-lm $LIBS"
  1033.  
  1034. else
  1035.   echo "$ac_t""no" 1>&6
  1036. fi
  1037.  
  1038. echo $ac_n "checking for -lgen""... $ac_c" 1>&6
  1039. if eval "test \"`echo '$''{'ac_cv_lib_gen'+set}'`\" = set"; then
  1040.   echo $ac_n "(cached) $ac_c" 1>&6
  1041. else
  1042.   ac_save_LIBS="$LIBS"
  1043. LIBS="-lgen  $LIBS"
  1044. cat > conftest.$ac_ext <<EOF
  1045. #line 1046 "configure"
  1046. #include "confdefs.h"
  1047.  
  1048. int main() { return 0; }
  1049. int t() {
  1050. pathfind()
  1051. ; return 0; }
  1052. EOF
  1053. if eval $ac_link; then
  1054.   rm -rf conftest*
  1055.   eval "ac_cv_lib_gen=yes"
  1056. else
  1057.   rm -rf conftest*
  1058.   eval "ac_cv_lib_gen=no"
  1059. fi
  1060. rm -f conftest*
  1061. LIBS="$ac_save_LIBS"
  1062.  
  1063. fi
  1064. if eval "test \"`echo '$ac_cv_lib_'gen`\" = yes"; then
  1065.   echo "$ac_t""yes" 1>&6
  1066.     ac_tr_lib=HAVE_LIB`echo gen | tr '[a-z]' '[A-Z]'`
  1067.   cat >> confdefs.h <<EOF
  1068. #define $ac_tr_lib 1
  1069. EOF
  1070.  
  1071.   LIBS="-lgen $LIBS"
  1072.  
  1073. else
  1074.   echo "$ac_t""no" 1>&6
  1075. fi
  1076.  
  1077. echo $ac_n "checking for -lnsl""... $ac_c" 1>&6
  1078. if eval "test \"`echo '$''{'ac_cv_lib_nsl'+set}'`\" = set"; then
  1079.   echo $ac_n "(cached) $ac_c" 1>&6
  1080. else
  1081.   ac_save_LIBS="$LIBS"
  1082. LIBS="-lnsl  $LIBS"
  1083. cat > conftest.$ac_ext <<EOF
  1084. #line 1085 "configure"
  1085. #include "confdefs.h"
  1086.  
  1087. int main() { return 0; }
  1088. int t() {
  1089. gethostbyaddr()
  1090. ; return 0; }
  1091. EOF
  1092. if eval $ac_link; then
  1093.   rm -rf conftest*
  1094.   eval "ac_cv_lib_nsl=yes"
  1095. else
  1096.   rm -rf conftest*
  1097.   eval "ac_cv_lib_nsl=no"
  1098. fi
  1099. rm -f conftest*
  1100. LIBS="$ac_save_LIBS"
  1101.  
  1102. fi
  1103. if eval "test \"`echo '$ac_cv_lib_'nsl`\" = yes"; then
  1104.   echo "$ac_t""yes" 1>&6
  1105.     ac_tr_lib=HAVE_LIB`echo nsl | tr '[a-z]' '[A-Z]'`
  1106.   cat >> confdefs.h <<EOF
  1107. #define $ac_tr_lib 1
  1108. EOF
  1109.  
  1110.   LIBS="-lnsl $LIBS"
  1111.  
  1112. else
  1113.   echo "$ac_t""no" 1>&6
  1114. fi
  1115.  
  1116. echo $ac_n "checking for -lsocket""... $ac_c" 1>&6
  1117. if eval "test \"`echo '$''{'ac_cv_lib_socket'+set}'`\" = set"; then
  1118.   echo $ac_n "(cached) $ac_c" 1>&6
  1119. else
  1120.   ac_save_LIBS="$LIBS"
  1121. LIBS="-lsocket  $LIBS"
  1122. cat > conftest.$ac_ext <<EOF
  1123. #line 1124 "configure"
  1124. #include "confdefs.h"
  1125.  
  1126. int main() { return 0; }
  1127. int t() {
  1128. socket()
  1129. ; return 0; }
  1130. EOF
  1131. if eval $ac_link; then
  1132.   rm -rf conftest*
  1133.   eval "ac_cv_lib_socket=yes"
  1134. else
  1135.   rm -rf conftest*
  1136.   eval "ac_cv_lib_socket=no"
  1137. fi
  1138. rm -f conftest*
  1139. LIBS="$ac_save_LIBS"
  1140.  
  1141. fi
  1142. if eval "test \"`echo '$ac_cv_lib_'socket`\" = yes"; then
  1143.   echo "$ac_t""yes" 1>&6
  1144.     ac_tr_lib=HAVE_LIB`echo socket | tr '[a-z]' '[A-Z]'`
  1145.   cat >> confdefs.h <<EOF
  1146. #define $ac_tr_lib 1
  1147. EOF
  1148.  
  1149.   LIBS="-lsocket $LIBS"
  1150.  
  1151. else
  1152.   echo "$ac_t""no" 1>&6
  1153. fi
  1154.  
  1155. echo $ac_n "checking for -lelf""... $ac_c" 1>&6
  1156. if eval "test \"`echo '$''{'ac_cv_lib_elf'+set}'`\" = set"; then
  1157.   echo $ac_n "(cached) $ac_c" 1>&6
  1158. else
  1159.   ac_save_LIBS="$LIBS"
  1160. LIBS="-lelf  $LIBS"
  1161. cat > conftest.$ac_ext <<EOF
  1162. #line 1163 "configure"
  1163. #include "confdefs.h"
  1164.  
  1165. int main() { return 0; }
  1166. int t() {
  1167. nlist()
  1168. ; return 0; }
  1169. EOF
  1170. if eval $ac_link; then
  1171.   rm -rf conftest*
  1172.   eval "ac_cv_lib_elf=yes"
  1173. else
  1174.   rm -rf conftest*
  1175.   eval "ac_cv_lib_elf=no"
  1176. fi
  1177. rm -f conftest*
  1178. LIBS="$ac_save_LIBS"
  1179.  
  1180. fi
  1181. if eval "test \"`echo '$ac_cv_lib_'elf`\" = yes"; then
  1182.   echo "$ac_t""yes" 1>&6
  1183.     ac_tr_lib=HAVE_LIB`echo elf | tr '[a-z]' '[A-Z]'`
  1184.   cat >> confdefs.h <<EOF
  1185. #define $ac_tr_lib 1
  1186. EOF
  1187.  
  1188.   LIBS="-lelf $LIBS"
  1189.  
  1190. else
  1191.   echo "$ac_t""no" 1>&6
  1192. fi
  1193.  
  1194. echo $ac_n "checking for -lld""... $ac_c" 1>&6
  1195. if eval "test \"`echo '$''{'ac_cv_lib_ld'+set}'`\" = set"; then
  1196.   echo $ac_n "(cached) $ac_c" 1>&6
  1197. else
  1198.   ac_save_LIBS="$LIBS"
  1199. LIBS="-lld  $LIBS"
  1200. cat > conftest.$ac_ext <<EOF
  1201. #line 1202 "configure"
  1202. #include "confdefs.h"
  1203.  
  1204. int main() { return 0; }
  1205. int t() {
  1206. ldopen()
  1207. ; return 0; }
  1208. EOF
  1209. if eval $ac_link; then
  1210.   rm -rf conftest*
  1211.   eval "ac_cv_lib_ld=yes"
  1212. else
  1213.   rm -rf conftest*
  1214.   eval "ac_cv_lib_ld=no"
  1215. fi
  1216. rm -f conftest*
  1217. LIBS="$ac_save_LIBS"
  1218.  
  1219. fi
  1220. if eval "test \"`echo '$ac_cv_lib_'ld`\" = yes"; then
  1221.   echo "$ac_t""yes" 1>&6
  1222.     ac_tr_lib=HAVE_LIB`echo ld | tr '[a-z]' '[A-Z]'`
  1223.   cat >> confdefs.h <<EOF
  1224. #define $ac_tr_lib 1
  1225. EOF
  1226.  
  1227.   LIBS="-lld $LIBS"
  1228.  
  1229. else
  1230.   echo "$ac_t""no" 1>&6
  1231. fi
  1232.  
  1233. echo $ac_n "checking for -ldl""... $ac_c" 1>&6
  1234. if eval "test \"`echo '$''{'ac_cv_lib_dl'+set}'`\" = set"; then
  1235.   echo $ac_n "(cached) $ac_c" 1>&6
  1236. else
  1237.   ac_save_LIBS="$LIBS"
  1238. LIBS="-ldl  $LIBS"
  1239. cat > conftest.$ac_ext <<EOF
  1240. #line 1241 "configure"
  1241. #include "confdefs.h"
  1242.  
  1243. int main() { return 0; }
  1244. int t() {
  1245. dlopen()
  1246. ; return 0; }
  1247. EOF
  1248. if eval $ac_link; then
  1249.   rm -rf conftest*
  1250.   eval "ac_cv_lib_dl=yes"
  1251. else
  1252.   rm -rf conftest*
  1253.   eval "ac_cv_lib_dl=no"
  1254. fi
  1255. rm -f conftest*
  1256. LIBS="$ac_save_LIBS"
  1257.  
  1258. fi
  1259. if eval "test \"`echo '$ac_cv_lib_'dl`\" = yes"; then
  1260.   echo "$ac_t""yes" 1>&6
  1261.     ac_tr_lib=HAVE_LIB`echo dl | tr '[a-z]' '[A-Z]'`
  1262.   cat >> confdefs.h <<EOF
  1263. #define $ac_tr_lib 1
  1264. EOF
  1265.  
  1266.   LIBS="-ldl $LIBS"
  1267.  
  1268. else
  1269.   echo "$ac_t""no" 1>&6
  1270. fi
  1271.  
  1272.  
  1273. echo $ac_n "checking return type of signal handlers""... $ac_c" 1>&6
  1274. if eval "test \"`echo '$''{'ac_cv_type_signal'+set}'`\" = set"; then
  1275.   echo $ac_n "(cached) $ac_c" 1>&6
  1276. else
  1277.   cat > conftest.$ac_ext <<EOF
  1278. #line 1279 "configure"
  1279. #include "confdefs.h"
  1280. #include <sys/types.h>
  1281. #include <signal.h>
  1282. #ifdef signal
  1283. #undef signal
  1284. #endif
  1285. #ifdef __cplusplus
  1286. extern "C"
  1287. #endif
  1288. void (*signal ()) ();
  1289. int main() { return 0; }
  1290. int t() {
  1291. int i;
  1292. ; return 0; }
  1293. EOF
  1294. if eval $ac_compile; then
  1295.   rm -rf conftest*
  1296.   ac_cv_type_signal=void
  1297. else
  1298.   rm -rf conftest*
  1299.   ac_cv_type_signal=int
  1300. fi
  1301. rm -f conftest*
  1302.  
  1303. fi
  1304. echo "$ac_t""$ac_cv_type_signal" 1>&6
  1305. cat >> confdefs.h <<EOF
  1306. #define RETSIGTYPE $ac_cv_type_signal
  1307. EOF
  1308.  
  1309.  
  1310. echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
  1311. # On Suns, sometimes $CPP names a directory.
  1312. if test -n "$CPP" && test -d "$CPP"; then
  1313.   CPP=
  1314. fi
  1315. if test -z "$CPP"; then
  1316. if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
  1317.   echo $ac_n "(cached) $ac_c" 1>&6
  1318. else
  1319.     # This must be in double quotes, not single quotes, because CPP may get
  1320.   # substituted into the Makefile and "${CC-cc}" will confuse make.
  1321.   CPP="${CC-cc} -E"
  1322.   # On the NeXT, cc -E runs the code through the compiler's parser,
  1323.   # not just through cpp.
  1324.   cat > conftest.$ac_ext <<EOF
  1325. #line 1326 "configure"
  1326. #include "confdefs.h"
  1327. #include <assert.h>
  1328. Syntax Error
  1329. EOF
  1330. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1331. ac_err=`grep -v '^ *+' conftest.out`
  1332. if test -z "$ac_err"; then
  1333.   :
  1334. else
  1335.   echo "$ac_err" >&5
  1336.   rm -rf conftest*
  1337.   CPP="${CC-cc} -E -traditional-cpp"
  1338.   cat > conftest.$ac_ext <<EOF
  1339. #line 1340 "configure"
  1340. #include "confdefs.h"
  1341. #include <assert.h>
  1342. Syntax Error
  1343. EOF
  1344. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1345. ac_err=`grep -v '^ *+' conftest.out`
  1346. if test -z "$ac_err"; then
  1347.   :
  1348. else
  1349.   echo "$ac_err" >&5
  1350.   rm -rf conftest*
  1351.   CPP=/lib/cpp
  1352. fi
  1353. rm -f conftest*
  1354. fi
  1355. rm -f conftest*
  1356.   ac_cv_prog_CPP="$CPP"
  1357. fi
  1358.   CPP="$ac_cv_prog_CPP"
  1359. else
  1360.   ac_cv_prog_CPP="$CPP"
  1361. fi
  1362. echo "$ac_t""$CPP" 1>&6
  1363.  
  1364. for ac_hdr in libgen.h sys/timeb.h posix/time.h sys/select.h
  1365. do
  1366. ac_safe=`echo "$ac_hdr" | tr './\055' '___'`
  1367. echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
  1368. if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
  1369.   echo $ac_n "(cached) $ac_c" 1>&6
  1370. else
  1371.   cat > conftest.$ac_ext <<EOF
  1372. #line 1373 "configure"
  1373. #include "confdefs.h"
  1374. #include <$ac_hdr>
  1375. EOF
  1376. eval "$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
  1377. ac_err=`grep -v '^ *+' conftest.out`
  1378. if test -z "$ac_err"; then
  1379.   rm -rf conftest*
  1380.   eval "ac_cv_header_$ac_safe=yes"
  1381. else
  1382.   echo "$ac_err" >&5
  1383.   rm -rf conftest*
  1384.   eval "ac_cv_header_$ac_safe=no"
  1385. fi
  1386. rm -f conftest*
  1387. fi
  1388. if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
  1389.   echo "$ac_t""yes" 1>&6
  1390.     ac_tr_hdr=HAVE_`echo $ac_hdr | tr '[a-z]./\055' '[A-Z]___'`
  1391.   cat >> confdefs.h <<EOF
  1392. #define $ac_tr_hdr 1
  1393. EOF
  1394.  
  1395. else
  1396.   echo "$ac_t""no" 1>&6
  1397. fi
  1398. done
  1399.  
  1400. for ac_func in strerror
  1401. do
  1402. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1403. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1404.   echo $ac_n "(cached) $ac_c" 1>&6
  1405. else
  1406.   cat > conftest.$ac_ext <<EOF
  1407. #line 1408 "configure"
  1408. #include "confdefs.h"
  1409. /* System header to define __stub macros and hopefully few prototypes,
  1410.     which can conflict with char $ac_func(); below.  */
  1411. #include <assert.h>
  1412. /* Override any gcc2 internal prototype to avoid an error.  */
  1413. char $ac_func(); 
  1414.  
  1415. int main() { return 0; }
  1416. int t() {
  1417.  
  1418. /* The GNU C library defines this for functions which it implements
  1419.     to always fail with ENOSYS.  Some functions are actually named
  1420.     something starting with __ and the normal name is an alias.  */
  1421. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1422. choke me
  1423. #else
  1424. $ac_func();
  1425. #endif
  1426.  
  1427. ; return 0; }
  1428. EOF
  1429. if eval $ac_link; then
  1430.   rm -rf conftest*
  1431.   eval "ac_cv_func_$ac_func=yes"
  1432. else
  1433.   rm -rf conftest*
  1434.   eval "ac_cv_func_$ac_func=no"
  1435. fi
  1436. rm -f conftest*
  1437.  
  1438. fi
  1439. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1440.   echo "$ac_t""yes" 1>&6
  1441.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1442.   cat >> confdefs.h <<EOF
  1443. #define $ac_tr_func 1
  1444. EOF
  1445.  
  1446. else
  1447.   echo "$ac_t""no" 1>&6
  1448. fi
  1449. done
  1450.  
  1451. for ac_func in dlopen gettimeofday ftime nlist select setitimer sigaction
  1452. do
  1453. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1454. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1455.   echo $ac_n "(cached) $ac_c" 1>&6
  1456. else
  1457.   cat > conftest.$ac_ext <<EOF
  1458. #line 1459 "configure"
  1459. #include "confdefs.h"
  1460. /* System header to define __stub macros and hopefully few prototypes,
  1461.     which can conflict with char $ac_func(); below.  */
  1462. #include <assert.h>
  1463. /* Override any gcc2 internal prototype to avoid an error.  */
  1464. char $ac_func(); 
  1465.  
  1466. int main() { return 0; }
  1467. int t() {
  1468.  
  1469. /* The GNU C library defines this for functions which it implements
  1470.     to always fail with ENOSYS.  Some functions are actually named
  1471.     something starting with __ and the normal name is an alias.  */
  1472. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1473. choke me
  1474. #else
  1475. $ac_func();
  1476. #endif
  1477.  
  1478. ; return 0; }
  1479. EOF
  1480. if eval $ac_link; then
  1481.   rm -rf conftest*
  1482.   eval "ac_cv_func_$ac_func=yes"
  1483. else
  1484.   rm -rf conftest*
  1485.   eval "ac_cv_func_$ac_func=no"
  1486. fi
  1487. rm -f conftest*
  1488.  
  1489. fi
  1490. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1491.   echo "$ac_t""yes" 1>&6
  1492.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1493.   cat >> confdefs.h <<EOF
  1494. #define $ac_tr_func 1
  1495. EOF
  1496.  
  1497. else
  1498.   echo "$ac_t""no" 1>&6
  1499. fi
  1500. done
  1501.  
  1502. for ac_func in socket chroot
  1503. do
  1504. echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
  1505. if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
  1506.   echo $ac_n "(cached) $ac_c" 1>&6
  1507. else
  1508.   cat > conftest.$ac_ext <<EOF
  1509. #line 1510 "configure"
  1510. #include "confdefs.h"
  1511. /* System header to define __stub macros and hopefully few prototypes,
  1512.     which can conflict with char $ac_func(); below.  */
  1513. #include <assert.h>
  1514. /* Override any gcc2 internal prototype to avoid an error.  */
  1515. char $ac_func(); 
  1516.  
  1517. int main() { return 0; }
  1518. int t() {
  1519.  
  1520. /* The GNU C library defines this for functions which it implements
  1521.     to always fail with ENOSYS.  Some functions are actually named
  1522.     something starting with __ and the normal name is an alias.  */
  1523. #if defined (__stub_$ac_func) || defined (__stub___$ac_func)
  1524. choke me
  1525. #else
  1526. $ac_func();
  1527. #endif
  1528.  
  1529. ; return 0; }
  1530. EOF
  1531. if eval $ac_link; then
  1532.   rm -rf conftest*
  1533.   eval "ac_cv_func_$ac_func=yes"
  1534. else
  1535.   rm -rf conftest*
  1536.   eval "ac_cv_func_$ac_func=no"
  1537. fi
  1538. rm -f conftest*
  1539.  
  1540. fi
  1541. if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
  1542.   echo "$ac_t""yes" 1>&6
  1543.     ac_tr_func=HAVE_`echo $ac_func | tr '[a-z]' '[A-Z]'`
  1544.   cat >> confdefs.h <<EOF
  1545. #define $ac_tr_func 1
  1546. EOF
  1547.  
  1548. else
  1549.   echo "$ac_t""no" 1>&6
  1550. fi
  1551. done
  1552.  
  1553.  
  1554.  
  1555.   echo $ac_n "checking for RISC/OS POSIX library lossage""... $ac_c" 1>&6
  1556.   if eval "test \"`echo '$''{'s48_cv_posix_libc'+set}'`\" = set"; then
  1557.   echo $ac_n "(cached) $ac_c" 1>&6
  1558. else
  1559.   
  1560.     if test -f /usr/posix/usr/lib/libc.a; then
  1561.       s48_cv_posix_libc=yes
  1562.     else
  1563.       s48_cv_posix_libc=no
  1564.     fi
  1565. fi
  1566.  
  1567.   echo "$ac_t""$s48_cv_posix_libc" 1>&6
  1568.   if test $s48_cv_posix_libc = yes; then
  1569.     LIBS="${LIBS} /usr/posix/usr/lib/libc.a"
  1570.   fi
  1571.  
  1572.  
  1573.   echo $ac_n "checking whether we can use -O2""... $ac_c" 1>&6
  1574.   if eval "test \"`echo '$''{'s48_cv_cflag_o2'+set}'`\" = set"; then
  1575.   echo $ac_n "(cached) $ac_c" 1>&6
  1576. else
  1577.   
  1578.     if test "z$CFLAGS" = "z"; then 
  1579.       if test "z$GCC" = "z"; then 
  1580.         s48_cv_cflag_o2=yes
  1581.       else 
  1582.         s48_cv_cflag_o2=no
  1583.       fi
  1584.     else
  1585.       s48_cv_cflag_o2=preset
  1586.     fi
  1587. fi
  1588.  
  1589.   echo "$ac_t""$s48_cv_cflag_o2" 1>&6
  1590.   case "$s48_cv_cflag_o2" in
  1591.     yes )
  1592.       CFLAGS="-O"
  1593.     ;;
  1594.     no )
  1595.       CFLAGS="-O2 -g"
  1596.     ;;
  1597.   esac
  1598.  
  1599.  
  1600.   echo $ac_n "checking for underscore before symbols""... $ac_c" 1>&6
  1601.   if eval "test \"`echo '$''{'s48_cv_uscore'+set}'`\" = set"; then
  1602.   echo $ac_n "(cached) $ac_c" 1>&6
  1603. else
  1604.   
  1605.     echo "main(){int i=1;}
  1606.     fnord(){int i=23; int ltuae=42;}" > conftest.c
  1607.     ${CC} conftest.c > /dev/null
  1608.     if (nm a.out | grep _fnord) > /dev/null; then
  1609.       s48_cv_uscore=yes
  1610.     else
  1611.       s48_cv_uscore=no
  1612.     fi
  1613. fi
  1614.  
  1615.   echo "$ac_t""$s48_cv_uscore" 1>&6
  1616.   if test $s48_cv_uscore = yes; then
  1617.     cat >> confdefs.h <<\EOF
  1618. #define USCORE 1
  1619. EOF
  1620.  
  1621.   fi
  1622.   rm -f conftest.c a.out
  1623.  
  1624.  
  1625.   echo $ac_n "checking for n_name""... $ac_c" 1>&6
  1626.   if eval "test \"`echo '$''{'s48_cv_nlist'+set}'`\" = set"; then
  1627.   echo $ac_n "(cached) $ac_c" 1>&6
  1628. else
  1629.   
  1630.     cat > conftest.$ac_ext <<EOF
  1631. #line 1632 "configure"
  1632. #include "confdefs.h"
  1633. #include <nlist.h>
  1634. int main() { return 0; }
  1635. int t() {
  1636. struct nlist name_list;
  1637.                     name_list.n_name = "foo";
  1638. ; return 0; }
  1639. EOF
  1640. if eval $ac_compile; then
  1641.   rm -rf conftest*
  1642.   s48_cv_nlist=yes
  1643. else
  1644.   rm -rf conftest*
  1645.   s48_cv_nlist=no
  1646. fi
  1647. rm -f conftest*
  1648.  
  1649. fi
  1650.  
  1651.   echo "$ac_t""$s48_cv_nlist" 1>&6
  1652.   if test $s48_cv_nlist = yes; then
  1653.     cat >> confdefs.h <<\EOF
  1654. #define NLIST_HAS_N_NAME 1
  1655. EOF
  1656.  
  1657.   fi
  1658.  
  1659.  
  1660.   echo $ac_n "checking for _cnt""... $ac_c" 1>&6
  1661.   if eval "test \"`echo '$''{'s48_cv__cnt'+set}'`\" = set"; then
  1662.   echo $ac_n "(cached) $ac_c" 1>&6
  1663. else
  1664.   
  1665.     cat > conftest.$ac_ext <<EOF
  1666. #line 1667 "configure"
  1667. #include "confdefs.h"
  1668. #include <stdio.h>
  1669. int main() { return 0; }
  1670. int t() {
  1671. return stdin->_cnt;
  1672. ; return 0; }
  1673. EOF
  1674. if eval $ac_compile; then
  1675.   rm -rf conftest*
  1676.   s48_cv__cnt=yes
  1677. else
  1678.   rm -rf conftest*
  1679.   s48_cv__cnt=no
  1680. fi
  1681. rm -f conftest*
  1682.  
  1683. fi
  1684.  
  1685.   echo "$ac_t""$s48_cv__cnt" 1>&6
  1686.   if test $s48_cv__cnt = yes; then
  1687.     cat >> confdefs.h <<\EOF
  1688. #define FILE_HAS__CNT 1
  1689. EOF
  1690.  
  1691.   fi
  1692.  
  1693.  
  1694.  
  1695.   echo $ac_n "checking for tzname""... $ac_c" 1>&6
  1696.   if eval "test \"`echo '$''{'scsh_cv_tzname'+set}'`\" = set"; then
  1697.   echo $ac_n "(cached) $ac_c" 1>&6
  1698. else
  1699.   
  1700.     cat > conftest.$ac_ext <<EOF
  1701. #line 1702 "configure"
  1702. #include "confdefs.h"
  1703. #include <time.h>
  1704. int main() { return 0; }
  1705. int t() {
  1706. return (int) tzname;
  1707. ; return 0; }
  1708. EOF
  1709. if eval $ac_compile; then
  1710.   rm -rf conftest*
  1711.   scsh_cv_tzname=yes
  1712. else
  1713.   rm -rf conftest*
  1714.   scsh_cv_tzname=no
  1715. fi
  1716. rm -f conftest*
  1717.  
  1718. fi
  1719.  
  1720.   echo "$ac_t""$scsh_cv_tzname" 1>&6
  1721.   if test $scsh_cv_tzname = yes; then
  1722.     cat >> confdefs.h <<\EOF
  1723. #define HAVE_TZNAME 1
  1724. EOF
  1725.  
  1726.   fi
  1727.  
  1728.  
  1729.   echo $ac_n "checking for gmtoff""... $ac_c" 1>&6
  1730.   if eval "test \"`echo '$''{'scsh_cv_gmtoff'+set}'`\" = set"; then
  1731.   echo $ac_n "(cached) $ac_c" 1>&6
  1732. else
  1733.   
  1734.     cat > conftest.$ac_ext <<EOF
  1735. #line 1736 "configure"
  1736. #include "confdefs.h"
  1737. #include <time.h>
  1738. int main() { return 0; }
  1739. int t() {
  1740. struct tm time;
  1741.             return time.tm_gmtoff;
  1742. ; return 0; }
  1743. EOF
  1744. if eval $ac_compile; then
  1745.   rm -rf conftest*
  1746.   scsh_cv_gmtoff=yes
  1747. else
  1748.   rm -rf conftest*
  1749.   scsh_cv_gmtoff=no
  1750. fi
  1751. rm -f conftest*
  1752.  
  1753. fi
  1754.  
  1755.   echo "$ac_t""$scsh_cv_gmtoff" 1>&6
  1756.   if test $scsh_cv_gmtoff = yes; then
  1757.     cat >> confdefs.h <<\EOF
  1758. #define HAVE_GMTOFF 1
  1759. EOF
  1760.  
  1761.   fi
  1762.  
  1763.  
  1764.   echo $ac_n "checking for const sys_errlist""... $ac_c" 1>&6
  1765.   if eval "test \"`echo '$''{'scsh_cv_const_sys_errlist'+set}'`\" = set"; then
  1766.   echo $ac_n "(cached) $ac_c" 1>&6
  1767. else
  1768.   
  1769.     cat > conftest.$ac_ext <<EOF
  1770. #line 1771 "configure"
  1771. #include "confdefs.h"
  1772. #include <errno.h>
  1773.                     #include <unistd.h>
  1774. int main() { return 0; }
  1775. int t() {
  1776. const extern char *sys_errlist[];
  1777. ; return 0; }
  1778. EOF
  1779. if eval $ac_compile; then
  1780.   rm -rf conftest*
  1781.   scsh_cv_const_sys_errlist=yes
  1782. else
  1783.   rm -rf conftest*
  1784.   scsh_cv_const_sys_errlist=no
  1785. fi
  1786. rm -f conftest*
  1787.  
  1788. fi
  1789.  
  1790.   echo "$ac_t""$scsh_cv_const_sys_errlist" 1>&6
  1791.   if test $scsh_cv_const_sys_errlist = yes; then
  1792.     cat >> confdefs.h <<\EOF
  1793. #define HAVE_CONST_SYS_ERRLIST 1
  1794. EOF
  1795.  
  1796.   fi
  1797.  
  1798.  
  1799. CFLAGS1=${CFLAGS}
  1800.  
  1801.  
  1802.  
  1803.  
  1804.  
  1805.  
  1806.  
  1807.  
  1808.  
  1809.  
  1810.  
  1811.  
  1812. trap '' 1 2 15
  1813. cat > confcache <<\EOF
  1814. # This file is a shell script that caches the results of configure
  1815. # tests run on this system so they can be shared between configure
  1816. # scripts and configure runs.  It is not useful on other systems.
  1817. # If it contains results you don't want to keep, you may remove or edit it.
  1818. #
  1819. # By default, configure uses ./config.cache as the cache file,
  1820. # creating it if it does not exist already.  You can give configure
  1821. # the --cache-file=FILE option to use a different cache file; that is
  1822. # what configure does when it calls configure scripts in
  1823. # subdirectories, so they share the cache.
  1824. # Giving --cache-file=/dev/null disables caching, for debugging configure.
  1825. # config.status only pays attention to the cache file if you give it the
  1826. # --recheck option to rerun configure.
  1827. #
  1828. EOF
  1829. # Ultrix sh set writes to stderr and can't be redirected directly,
  1830. # and sets the high bit in the cache file unless we assign to the vars.
  1831. (set) 2>&1 |
  1832.   sed -n "s/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=\${\1='\2'}/p" \
  1833.   >> confcache
  1834. if cmp -s $cache_file confcache; then
  1835.   :
  1836. else
  1837.   if test -w $cache_file; then
  1838.     echo "updating cache $cache_file"
  1839.     cat confcache > $cache_file
  1840.   else
  1841.     echo "not updating unwritable cache $cache_file"
  1842.   fi
  1843. fi
  1844. rm -f confcache
  1845.  
  1846. trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
  1847.  
  1848. test "x$prefix" = xNONE && prefix=$ac_default_prefix
  1849. # Let make expand exec_prefix.
  1850. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
  1851.  
  1852. # Any assignment to VPATH causes Sun make to only execute
  1853. # the first set of double-colon rules, so remove it if not needed.
  1854. # If there is a colon in the path, we need to keep it.
  1855. if test "x$srcdir" = x.; then
  1856.   ac_vpsub='/^[     ]*VPATH[     ]*=[^:]*$/d'
  1857. fi
  1858.  
  1859. trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
  1860.  
  1861. DEFS=-DHAVE_CONFIG_H
  1862.  
  1863. # Without the "./", some shells look in PATH for config.status.
  1864. : ${CONFIG_STATUS=./config.status}
  1865.  
  1866. echo creating $CONFIG_STATUS
  1867. rm -f $CONFIG_STATUS
  1868. cat > $CONFIG_STATUS <<EOF
  1869. #! /bin/sh
  1870. # Generated automatically by configure.
  1871. # Run this file to recreate the current configuration.
  1872. # This directory was configured as follows,
  1873. # on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
  1874. #
  1875. # $0 $ac_configure_args
  1876. #
  1877. # Compiler output produced by configure, useful for debugging
  1878. # configure, is in ./config.log if it exists.
  1879.  
  1880. ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
  1881. for ac_option
  1882. do
  1883.   case "\$ac_option" in
  1884.   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
  1885.     echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
  1886.     exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
  1887.   -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
  1888.     echo "$CONFIG_STATUS generated by autoconf version 2.4"
  1889.     exit 0 ;;
  1890.   -help | --help | --hel | --he | --h)
  1891.     echo "\$ac_cs_usage"; exit 0 ;;
  1892.   *) echo "\$ac_cs_usage"; exit 1 ;;
  1893.   esac
  1894. done
  1895.  
  1896. ac_given_srcdir=$srcdir
  1897. ac_given_INSTALL="$INSTALL"
  1898.  
  1899. trap 'rm -fr `echo "Makefile scsh/regexp/Makefile scsh/endian.scm scsh/static.scm sysdep.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
  1900.  
  1901. # Protect against being on the right side of a sed subst in config.status. 
  1902. sed 's/%@/@@/; s/@%/@@/; s/%g$/@g/; /@g$/s/[\\\\&%]/\\\\&/g; 
  1903.  s/@@/%@/; s/@@/@%/; s/@g$/%g/' > conftest.subs <<\CEOF
  1904. $ac_vpsub
  1905. $extrasub
  1906. s%@CFLAGS@%$CFLAGS%g
  1907. s%@CPPFLAGS@%$CPPFLAGS%g
  1908. s%@CXXFLAGS@%$CXXFLAGS%g
  1909. s%@DEFS@%$DEFS%g
  1910. s%@LDFLAGS@%$LDFLAGS%g
  1911. s%@LIBS@%$LIBS%g
  1912. s%@exec_prefix@%$exec_prefix%g
  1913. s%@prefix@%$prefix%g
  1914. s%@program_transform_name@%$program_transform_name%g
  1915. s%@host@%$host%g
  1916. s%@host_alias@%$host_alias%g
  1917. s%@host_cpu@%$host_cpu%g
  1918. s%@host_vendor@%$host_vendor%g
  1919. s%@host_os@%$host_os%g
  1920. s%@CC@%$CC%g
  1921. s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
  1922. s%@INSTALL_DATA@%$INSTALL_DATA%g
  1923. s%@RANLIB@%$RANLIB%g
  1924. s%@CPP@%$CPP%g
  1925. s%@AIX_P@%$AIX_P%g
  1926. s%@AR@%$AR%g
  1927. s%@CFLAGS1@%$CFLAGS1%g
  1928. s%@ENDIAN@%$ENDIAN%g
  1929. s%@LDFLAGS_AIX@%$LDFLAGS_AIX%g
  1930. s%@TMPDIR@%$TMPDIR%g
  1931.  
  1932. CEOF
  1933. EOF
  1934. cat >> $CONFIG_STATUS <<EOF
  1935.  
  1936. CONFIG_FILES=\${CONFIG_FILES-"Makefile scsh/regexp/Makefile scsh/endian.scm scsh/static.scm"}
  1937. EOF
  1938. cat >> $CONFIG_STATUS <<\EOF
  1939. for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
  1940.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  1941.   case "$ac_file" in
  1942.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  1943.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  1944.   *) ac_file_in="${ac_file}.in" ;;
  1945.   esac
  1946.  
  1947.   # Adjust relative srcdir, etc. for subdirectories.
  1948.  
  1949.   # Remove last slash and all that follows it.  Not all systems have dirname.
  1950.   ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
  1951.   if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
  1952.     # The file is in a subdirectory.
  1953.     test ! -d "$ac_dir" && mkdir "$ac_dir"
  1954.     ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
  1955.     # A "../" for each directory in $ac_dir_suffix.
  1956.     ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
  1957.   else
  1958.     ac_dir_suffix= ac_dots=
  1959.   fi
  1960.  
  1961.   case "$ac_given_srcdir" in
  1962.   .)  srcdir=.
  1963.       if test -z "$ac_dots"; then top_srcdir=.
  1964.       else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
  1965.   /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
  1966.   *) # Relative path.
  1967.     srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
  1968.     top_srcdir="$ac_dots$ac_given_srcdir" ;;
  1969.   esac
  1970.  
  1971.   case "$ac_given_INSTALL" in
  1972.   [/$]*) INSTALL="$ac_given_INSTALL" ;;
  1973.   *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
  1974.   esac
  1975.   echo creating "$ac_file"
  1976.   rm -f "$ac_file"
  1977.   configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
  1978.   case "$ac_file" in
  1979.   *Makefile*) ac_comsub="1i\\
  1980. # $configure_input" ;;
  1981.   *) ac_comsub= ;;
  1982.   esac
  1983.   sed -e "$ac_comsub
  1984. s%@configure_input@%$configure_input%g
  1985. s%@srcdir@%$srcdir%g
  1986. s%@top_srcdir@%$top_srcdir%g
  1987. s%@INSTALL@%$INSTALL%g
  1988. " -f conftest.subs $ac_given_srcdir/$ac_file_in > $ac_file
  1989. fi; done
  1990. rm -f conftest.subs
  1991.  
  1992. # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
  1993. # NAME is the cpp macro being defined and VALUE is the value it is being given.
  1994. #
  1995. # ac_d sets the value in "#define NAME VALUE" lines.
  1996. ac_dA='s%^\([     ]*\)#\([     ]*define[     ][     ]*\)'
  1997. ac_dB='\([     ][     ]*\)[^     ]*%\1#\2'
  1998. ac_dC='\3'
  1999. ac_dD='%g'
  2000. # ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
  2001. ac_uA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2002. ac_uB='\([     ]\)%\1#\2define\3'
  2003. ac_uC=' '
  2004. ac_uD='\4%g'
  2005. # ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
  2006. ac_eA='s%^\([     ]*\)#\([     ]*\)undef\([     ][     ]*\)'
  2007. ac_eB='$%\1#\2define\3'
  2008. ac_eC=' '
  2009. ac_eD='%g'
  2010.  
  2011. CONFIG_HEADERS=${CONFIG_HEADERS-"sysdep.h"}
  2012. for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
  2013.   # Support "outfile[:infile]", defaulting infile="outfile.in".
  2014.   case "$ac_file" in
  2015.   *:*) ac_file_in=`echo "$ac_file"|sed 's%.*:%%'`
  2016.        ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
  2017.   *) ac_file_in="${ac_file}.in" ;;
  2018.   esac
  2019.  
  2020.   echo creating $ac_file
  2021.  
  2022.   rm -f conftest.frag conftest.in conftest.out
  2023.   cp $ac_given_srcdir/$ac_file_in conftest.in
  2024.  
  2025. EOF
  2026.  
  2027. # Transform confdefs.h into a sed script conftest.vals that substitutes
  2028. # the proper values into config.h.in to produce config.h.  And first:
  2029. # Protect against being on the right side of a sed subst in config.status. 
  2030. # Protect against being in an unquoted here document in config.status.
  2031. rm -f conftest.vals
  2032. cat > conftest.hdr <<\EOF
  2033. s/[\\&%]/\\&/g
  2034. s%[\\$`]%\\&%g
  2035. s%#define \([A-Za-z_][A-Za-z0-9_]*\) \(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
  2036. s%ac_d%ac_u%gp
  2037. s%ac_u%ac_e%gp
  2038. EOF
  2039. sed -n -f conftest.hdr confdefs.h > conftest.vals
  2040. rm -f conftest.hdr
  2041.  
  2042. # This sed command replaces #undef with comments.  This is necessary, for
  2043. # example, in the case of _POSIX_SOURCE, which is predefined and required
  2044. # on some systems where configure will not decide to define it.
  2045. cat >> conftest.vals <<\EOF
  2046. s%^[     ]*#[     ]*undef[     ][     ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
  2047. EOF
  2048.  
  2049. # Break up conftest.vals because some shells have a limit on
  2050. # the size of here documents, and old seds have small limits too.
  2051. # Maximum number of lines to put in a single here document.
  2052. ac_max_here_lines=12
  2053.  
  2054. rm -f conftest.tail
  2055. while :
  2056. do
  2057.   ac_lines=`grep -c . conftest.vals`
  2058.   # grep -c gives empty output for an empty file on some AIX systems.
  2059.   if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
  2060.   # Write a limited-size here document to conftest.frag.
  2061.   echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
  2062.   sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
  2063.   echo 'CEOF
  2064.   sed -f conftest.frag conftest.in > conftest.out
  2065.   rm -f conftest.in
  2066.   mv conftest.out conftest.in
  2067. ' >> $CONFIG_STATUS
  2068.   sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
  2069.   rm -f conftest.vals
  2070.   mv conftest.tail conftest.vals
  2071. done
  2072. rm -f conftest.vals
  2073.  
  2074. cat >> $CONFIG_STATUS <<\EOF
  2075.   rm -f conftest.frag conftest.h
  2076.   echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
  2077.   cat conftest.in >> conftest.h
  2078.   rm -f conftest.in
  2079.   if cmp -s $ac_file conftest.h 2>/dev/null; then
  2080.     echo "$ac_file is unchanged"
  2081.     rm -f conftest.h
  2082.   else
  2083.     rm -f $ac_file
  2084.     mv conftest.h $ac_file
  2085.   fi
  2086. fi; done
  2087.  
  2088.  
  2089.  
  2090. exit 0
  2091. EOF
  2092. chmod +x $CONFIG_STATUS
  2093. rm -fr confdefs* $ac_clean_files
  2094. test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
  2095.  
  2096. chmod +x scsh/static.scm
  2097.